import React from 'react';
import ReactDOM from 'react-dom';
import { BrowserRouter as Router, Switch, Redirect, Route, Link } from 'react-router-dom'
import Address from 'page/address/index.jsx';
import AddrEdit from 'page/address/toEdit.jsx';
import AddrAdd from 'page/address/toAdd.jsx';
import UserCenter from 'page/user/UserCenter.jsx';
import userInfo from 'page/user/userInfo.jsx';
import Lack from 'page/404/404.jsx';
import orderList from 'page/order/orderList.jsx';
import active from 'page/active/active.jsx';
import 'static/reset.css';
class App extends React.Component {
    render() {
        return (
            <Router >
             <Switch>
             <Route exact path="/" component={UserCenter}/>
                <Route path="/address" component={Address}></Route>
                <Route path="/addrEdit/:id" component={AddrEdit}></Route>
                <Route path="/addrAdd" component={AddrAdd}></Route>
                <Route path="/user" component={UserCenter}></Route>
                <Route path="/userInfo" component={userInfo}></Route>
                <Route path="/orderList/:type" component={orderList}></Route>
                <Route path="/404" component={Lack}></Route>
                <Route path="/active" component={active}></Route>
             </Switch>
            </Router>
        )
    }
}


ReactDOM.render(
    <App />,
    document.getElementById('app')
);